<template>
  <div>
    <!-- 标题 -->
    <div class="title">
        <img src="../../../assets/images/tool.png" alt="">
        <span>位置分布人员信息</span>
    </div>
    
    <!-- 内容 -->
    <div class="dataList">
      <el-form ref="form" :model="form" label-width="auto">
        <!-- 企业平面图 -->
        <el-form-item label="企业平面图（单文件）">
                <el-upload
                  class="upload-demo"
                  drag
                  action="https://jsonplaceholder.typicode.com/posts/"
                  multiple>
                <img src="../../../assets/images/uploadImg/uploadTwo.png" alt="">
                </el-upload>
        </el-form-item>
        <!-- 地图区域 -->
        <el-form-item label="地图区域" required>
           <el-tag
            :key="tag"
            v-for="tag in dynamicTags"
            closable
            :disable-transitions="false"
            @close="handleClose(tag)">
            {{tag}}
          </el-tag>
          <el-button type="primary" size="small">勾画地图区域</el-button>
        </el-form-item>
        <!-- 坐标 -->
         <el-row> 
          <el-col :span="12">
            <el-form-item label="经度" required>
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col> 
          <el-col :span="12">
            <el-form-item label="纬度" required>
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col>  
        </el-row>
        <el-button class="leftButton" type="primary" size="small">定位</el-button>
        <!-- 工业园区 -->
        <el-row> 
          <el-col :span="12">
            <el-form-item label="是否在化工园区内" required>
              <el-radio-group v-model="form.resource">
                <el-radio label="是"></el-radio>
                <el-radio label="否"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col> 
          <el-col :span="12">
            <el-form-item label="所属化工园区名称" required>
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col>  
        </el-row>
        <!-- 园区标识 -->
        <el-row> 
          <el-col :span="12">
            <el-form-item label="园区标识" required>
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col> 
          <el-col :span="12">
            <el-form-item label="区域位置分布" required>
              <el-input v-model="form.name"></el-input>
            </el-form-item>
          </el-col>  
        </el-row>
        <!-- 企业控制 -->
        <el-row> 
          <el-col :span="12">
            <el-form-item label="企业控制室或机柜间面向具有火灾、爆炸危险性装置一侧是否满足国家标准关于防火防爆的要求" label-width="318px"  required>
              <el-radio-group class="radioLocation" v-model="form.resource">
                <el-radio label="是"></el-radio>
                <el-radio label="否"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col> 
          <el-col :span="12">
            <el-form-item label="企业甲、乙类火灾危险性装置内是否设置办公室、操作室、固定操作岗位或休息室" label-width="290px" required>
              <el-radio-group class="radioLocation" v-model="form.resource">
                <el-radio label="是"></el-radio>
                <el-radio label="否"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>  
        </el-row>

        <el-form-item label="企业甲、乙类仓库内是否设有办公室、休息室" label-width="302px"  required>
              <el-radio-group v-model="form.resource">
                <el-radio label="是"></el-radio>
                <el-radio label="否"></el-radio>
              </el-radio-group>
        </el-form-item>

        <!-- 下一步按钮 -->
        <el-form-item class="middle">
            <el-button type="primary" @click="onSubmit" plain>保存</el-button>
            <el-button type="primary" @click="nextTo">下一步</el-button>
        </el-form-item>

      </el-form>
    </div>


  </div>
</template>

<script>
export default {
  data(){
    return{
      dynamicTags: ['已勾画'],
       form: {
         name: '',
       }

    }
  },
  methods:{
    handleClose(tag) {
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
      },
    nextTo(){
        this.$parent.next();
      },

  }


}
</script>

<style lang="scss" scoped>
.title{
  display: flex;
  padding: 14px;
  border-bottom: 1px solid #D3D3D3;
  span{
    margin-left: 10px;
  }
}

.dataList{
  padding: 20px;
}

/deep/ .el-upload__tip {
      color: #606266;
    margin-top: -13px;
}

.el-tag + .el-tag {
    margin-left: 10px;
  }

.el-button--small, .el-button--small.is-round{
      margin-left: 15px;
}

.leftButton{
  margin-left: 152px;
  margin-top: -10px;
}

.radioLocation{
  margin-top: 54px;
}

.middle{
  display: flex;
  justify-content: center;
}

/deep/ .el-upload-dragger{
  background: white;
  border: 0px;
  width: 323px;
  height: 161px;
}

</style>